import numpy as np

x = np.array( [ [1.6, 5], [5.7, 8] ] )

#矩阵与标量的广播运算
x = x*10

print(x)

y = np.array ( [ [1, 1], [1, 1] ] )
z = np.array( [ [2], [3]] )
a = np.array( [2, 3] )

#矩阵与列数相同的向量广播乘运算
print(y*z)
#矩阵与行数相同的向量广播乘运算
print(y*a)

#矩阵与列数相同的向量广播减运算
print(y-z)
